<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<!DOCTYPE HTML>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <jsp:include page="/resources/inc/head.jsp" />
    <link href="${basePath}/resources/zheng-admin/plugins/zTree_v3/css/demo.css" rel="stylesheet"/>
</head>
<body>
<form class="layui-form layui-form-pane" id="_form">
    <input type="hidden" name="skuId" value="${sku.id}">
    <div class="layui-form-item">
        <label class="layui-form-label">添加库存量</label>
        <div class="layui-input-block">
            <input type="text" name="inventory" lay-verify="number" autocomplete="off" class="layui-input"
                   value="0">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block" style="float: right">
            <button class="layui-btn" lay-submit="" lay-filter="sub">立即提交</button>
        </div>
    </div>
</form>
<jsp:include page="/resources/inc/footer.jsp" />
<script>
    $(function () {
        var url = "${basePath}/manage/product/sku/addInventory";
        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
        commonSubmit(url, "sub", index);
    });
    getFormData = function (data) {
        return JSON.stringify(data.field);
    }
</script>
</body>
</html>
